package escom.dds.gestionaralumno.bussines;

import java.util.List;

import javax.inject.Named;

import org.springframework.transaction.annotation.Transactional;

import escom.dds.gestionaralumno.dao.AlumnoDao;
import escom.dds.modelo.Alumno;

@Named("alumnoBs")
public class AlumnoBs {
	
	private AlumnoDao alumnoDao;
	
	@Transactional
	public Alumno findById(Alumno alumno) {
		return alumnoDao.findById(alumno);
	}
	
	@Transactional
	public Alumno save(Alumno alumno){
		return alumnoDao.save(alumno);
	}
	
	@Transactional
	public Alumno update(Alumno alumno){
		return alumnoDao.update(alumno);
	}
	
	@Transactional
	public Alumno delete(Alumno alumno){
		return alumnoDao.delete(alumno);
	}
	
	@Transactional
	public List<Alumno> findAll(){
		return alumnoDao.findAll();
	}

	/**
	 * @return the alumnoDao
	 */
	public AlumnoDao getAlumnoDao() {
		return alumnoDao;
	}

	/**
	 * @param alumnoDao the alumnoDao to set
	 */
	public void setAlumnoDao(AlumnoDao alumnoDao) {
		this.alumnoDao = alumnoDao;
	}
	
	

}
